import request from '@/utils/request'

// 查询training列表
export function listTraining(query) {
  return request({
    url: '/teacher/training/list',
    method: 'get',
    params: query
  })
}

// 查询training详细
export function getTraining(trainingId) {
  return request({
    url: '/teacher/training/' + trainingId,
    method: 'get'
  })
}

// 新增training
export function addTraining(data) {
  return request({
    url: '/teacher/training/add',
    method: 'post',
    data: data
  })
}

// 修改training
export function updateTraining(data) {
  return request({
    url: '/teacher/training/update',
    method: 'post',
    data: data
  })
}

// 删除training
export function delTraining(trainingId) {
  return request({
    url: '/teacher/training/' + trainingId,
    method: 'post'
  })
}
